﻿using System;

namespace SortStringByLength
{
    class SortStringByLength
    {
        static void Main(string[] args)
        {
            string[] strArray = { "aaa", "aaaaaa", "aaaa", "a", "aa", "aaaaa" };

            Array.Sort(strArray, (x, y) => (x.Length).CompareTo(y.Length));
            foreach (string str in strArray)
            {
                Console.Write("{0} ", str);
            }
        }
    }
}
